package com.wbl.train.common.feign;

import com.wbl.train.common.member.entity.TicketEntity;
import com.wbl.train.common.result.R;
import jakarta.validation.Valid;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * Author: 王博纶
 * Date: 2024/3/7 10:20
 * FileName: MemberFeign
 * Description: 会员模块的远程调用接口
 */
@FeignClient(name = "member-service",path = "/member/admin")
//@FeignClient(name = "member-service", url = "http://127.0.0.1:8080/member/admin")
public interface MemberFeign {

    /**
     * 车票保存的接口
     * @param tickets 车票集合
     * @return 保存成功与否的状态
     */
    @PostMapping("/ticket/save")
    R<Boolean> save(@RequestBody @Valid List<TicketEntity> tickets);

}
